﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using WalkingTec.Mvvm.Mvc;
using Digitalmes.Model;
using Digitalmes.ViewModel.ReportManagement;

using Digitalmes.Model.IntegrationManagement;


namespace Digitalmes.ReportManagement.Controllers
{
    [ApiController]
    [ActionDescription("_Group._Default")]
    [Route("/api/ReportManagement/_Default")]
    [AuthorizeJwtWithCookie]
    public partial class _DefaultController : BaseApiController
    {
            
        [HttpPost("GetChartDatag1733801922")]    
        public IActionResult GetChartDatag1733801922(Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher Searcher)
        {
             if(Searcher == null)
            {
                Searcher =new Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher();
            }
           var data = Wtm.DC.Set<IntgrSyncRemote>()
                    .AsNoTracking()
                    .Select(x=> new { _Category = 1 })
                    .GroupBy(x => new {x._Category}, x => x).OrderBy(x =>x.Key._Category)
                    .Select(x => new ChartData{})
                    .ToList();
            var rv = data.ToChartData();
            return Ok(rv);
        }


        [HttpPost("GetChartDatag1090774704")]    
        public IActionResult GetChartDatag1090774704(Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher1 Searcher)
        {
             if(Searcher == null)
            {
                Searcher =new Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher1();
            }
           var data = Wtm.DC.Set<IntgrSyncRemote>()
                    .AsNoTracking()
                    .Select(x=> new { _Category = 1 })
                    .GroupBy(x => new {x._Category}, x => x).OrderBy(x =>x.Key._Category)
                    .Select(x => new ChartData{})
                    .ToList();
            var rv = data.ToChartData();
            return Ok(rv);
        }


        [HttpPost("GetChartDatag8614978058")]    
        public IActionResult GetChartDatag8614978058(Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher2 Searcher)
        {
             if(Searcher == null)
            {
                Searcher =new Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher2();
            }
           var data = Wtm.DC.Set<IntgrSyncRemote>()
                    .AsNoTracking()
                    .Select(x=> new { _Category = 1 })
                    .GroupBy(x => new {x._Category}, x => x).OrderBy(x =>x.Key._Category)
                    .Select(x => new ChartData{})
                    .ToList();
            var rv = data.ToChartData();
            return Ok(rv);
        }


        [HttpPost("GetChartDatag9890500305")]    
        public IActionResult GetChartDatag9890500305(Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher3 Searcher)
        {
             if(Searcher == null)
            {
                Searcher =new Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher3();
            }
           var data = Wtm.DC.Set<IntgrSyncRemote>()
                    .AsNoTracking()
                    .Select(x=> new { _Category = 1 })
                    .GroupBy(x => new {x._Category}, x => x).OrderBy(x =>x.Key._Category)
                    .Select(x => new ChartData{})
                    .ToList();
            var rv = data.ToChartData();
            return Ok(rv);
        }


        [HttpPost("GetChartDatag7513482875")]    
        public IActionResult GetChartDatag7513482875(Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher4 Searcher)
        {
             if(Searcher == null)
            {
                Searcher =new Digitalmes.ViewModel.ReportManagement.IntgrSyncRemoteSearcher4();
            }
           var data = Wtm.DC.Set<IntgrSyncRemote>()
                    .AsNoTracking()
                    .Select(x=> new { _Category = 1 })
                    .GroupBy(x => new {x._Category}, x => x).OrderBy(x =>x.Key._Category)
                    .Select(x => new ChartData{})
                    .ToList();
            var rv = data.ToChartData();
            return Ok(rv);
        }


    }
}



